#include "CheckpointStep.h"

CheckpointStep::CheckpointStep(): checkpointreachableInterface(0), checkpointreachableObject(0)
{
}

CheckpointStep::CheckpointStep(const CheckpointStep& rhs): checkpointreachableInterface(rhs.checkpointreachableInterface), checkpointreachableObject(rhs.checkpointreachableObject)
{
}

CheckpointStep::~CheckpointStep()
{
}

void CheckpointStep::Execute()
{
	if (checkpointreachableInterface && checkpointreachableObject)
	{
		checkpointreachableInterface->CheckpointReached();
	}
}

void CheckpointStep::SetObject(GameObject* object, CheckpointReachable* checkpointreachable)
{
	checkpointreachableInterface = checkpointreachable;
	checkpointreachableObject = object;
}


CheckpointStep* CheckpointStep::Clone() const
{
	return new CheckpointStep(*this);
}
